<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/warehouseouts/Warehouseout.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/warehouseouts/Warehouseout.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'WarehouseoutId',
                footer: "Foots",
                cnName: '出库表',
                name: 'warehouseouts/Warehouseout',
                url: "/Warehouseout/",
                sortName: "WarehouseoutId"
            });
            const editFormFields = ref({"WarehouseoutType":"","OrderId":"","SupplierNumber":"","SupplierName":"","SupplierPeople":"","SupplierPhone":"","MakeupPeople":"","MakeupTime":"","Remark":"","Auditreason":"","IsDel":""});
            const editFormOptions = ref([[{"title":"关联订单号","field":"OrderId"},
                               {"dataKey":"出库类型","data":[],"title":"出库单类型","field":"WarehouseoutType","type":"select"}],
                              [{"title":"供应商编号","field":"SupplierNumber"},
                               {"title":"供应商名称","field":"SupplierName"}],
                              [{"title":"供应商联系人","field":"SupplierPeople"},
                               {"title":"供应商联系方式","field":"SupplierPhone"}],
                              [{"title":"制单人","field":"MakeupPeople"},
                               {"title":"制单时间","field":"MakeupTime"}],
                              [{"title":"备注","field":"Remark"},
                               {"title":"审核原因","field":"Auditreason"}],
                              [{"title":"是否删除","field":"IsDel","type":"number"}]]);
            const searchFormFields = ref({"WarehouseoutType":"","OrderId":""});
            const searchFormOptions = ref([[{"dataKey":"出库类型","data":[],"title":"出库单类型","field":"WarehouseoutType","type":"select"}],[{"title":"关联订单号","field":"OrderId"}]]);
            const columns = ref([{field:'WarehouseoutId',title:'出库单号',type:'string',width:220,require:true,align:'left',sort:true},
                       {field:'WarehouseoutType',title:'出库单类型',type:'int',bind:{ key:'出库类型',data:[]},width:110,align:'left'},
                       {field:'OrderId',title:'关联订单号',type:'string',width:220,align:'left'},
                       {field:'SupplierNumber',title:'供应商编号',type:'string',width:220,align:'left'},
                       {field:'SupplierName',title:'供应商名称',type:'string',width:220,align:'left'},
                       {field:'SupplierPeople',title:'供应商联系人',type:'string',width:220,align:'left'},
                       {field:'SupplierPhone',title:'供应商联系方式',type:'string',width:220,align:'left'},
                       {field:'MakeupPeople',title:'制单人',type:'string',width:220,align:'left'},
                       {field:'MakeupTime',title:'制单时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'Auditreason',title:'审核原因',type:'string',width:220,align:'left'},
                       {field:'IsDel',title:'是否删除',type:'int',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
